# -*- coding: utf-8 -*-
# @Time : 2022/4/9 20:20
# @Author : Liuqing
# @File : 12_计算元音字母数.py
# @Software : PyCharm
import re


# [aeiou] 表示匹配里面其中一个
def count_vowels(string):
    return len(re.findall(r'[aeiou]', string, re.IGNORECASE))


if __name__ == '__main__':
    print(count_vowels('foobar'))
    print(count_vowels('gym'))
